package com.wyh.www;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class Servlet1 implements Servlet{

	@Override
	public void destroy() {
		
	}
	@Override
	public void init(ServletConfig config) throws ServletException {
		System.out.println("*******init********");
	}
	@Override
	public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
		response.setContentType("text/html;charset=utf-8");
		System.out.println("******service*******");
		
		PrintWriter writer=response.getWriter();
		writer.write("这是第一个servlet小程序！");
	}
	@Override
	public ServletConfig getServletConfig() {
		return null;
	}
	@Override
	public String getServletInfo() {
		return null;
	}
}
